#include "Queue.h"

void TestQ1()
{
    Queue q;
    QueueInit(&q);
    QueuePush(&q, 1);
    QueuePush(&q, 2);
    QueuePush(&q, 3);
    QueuePush(&q, 4);
    QueuePush(&q, 5);
    QueuePush(&q, 6);

    QueuePop(&q);
    QueuePop(&q);
    QueuePop(&q);

    printf("%d\n", QueueFront(&q));
    printf("%d\n", QueueBack(&q));

    printf("%d\n", QueueSize(&q));

    QueueDestory(&q);
}

void TestQ2()
{
    Queue q;
    QueueInit(&q);
    QueuePush(&q, 1);
    QueuePush(&q, 2);
    QueuePush(&q, 3);
    QueuePush(&q, 4);
    QueuePush(&q, 5);
    QueuePush(&q, 6);

    while (!QueueEmpty(&q))
    {
        QDataType front = QueueFront(&q);
        printf("%d ", front);
        QueuePop(&q);
    }
    printf("\n");

    QueueDestory(&q);
}

int main()
{
    // TestQ1();
    TestQ2();
    return 0;
}